Skip to main content

Token balances APIs

In the following examples, we’re going to use the GetTokenBalancesSummary and GetTokenBalancesDetails methods from Sequence Indexer Gateway.

GetTokenBalancesSummary

  • Request: POST /rpc/IndexerGateway/GetTokenBalancesSummary
  • Content-Type: application/json
  • Body (in JSON):
    • chainIds ([]int - optional) — return results only for the chains that match the given ID.
    • networks ([]string - optional) — return results only for the chains that match the given names.
    • filter (object - optional) — query filters.
      • accountAddresses ([]string)
      • contractStatus (VERIFIED | UNVERIFIED | ALL)
      • contractWhitelist ([]string)
      • contractBlacklist ([]string)
      • omitNativeBalances (bool)
    • omitMetadata (boolean - optional - default: false)

GetTokenBalancesDetails

  • Request: POST /rpc/IndexerGateway/GetTokenBalancesDetails
  • Content-Type: application/json
  • Body (in JSON):
    • chainIds ([]int - optional) — return results only for the chains that match the given ID.
    • networks ([]string - optional) — return results only for the chains that match the given names.
    • filter (object - optional) — query filters.
      • accountAddresses ([]string)
      • contractStatus (VERIFIED | UNVERIFIED | ALL)
      • contractWhitelist ([]string)
      • contractBlacklist ([]string)
      • omitNativeBalances (bool)
    • omitMetadata (boolean - optional - default: false)

Get the summary of balances of verified tokens on specific networks

Example: Get the summary of all verified token balances for a specific account on mainnet and polygon

Get balance details of specific contracts on all networks

Example: Get the balance details of the USDC contracts on Arbitrum, Polygon and Mainne